package cn.wolfcode.luowowo.acticle.service;


import cn.wolfcode.luowowo.acticle.domain.StrategyCatalog;
import cn.wolfcode.luowowo.common.exception.DisplayableException;
import cn.wolfcode.luowowo.common.query.QueryObject;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * 攻略分类
 */
public interface IStrategyCatalogService {
    /**
     * 分页
     * @param qo
     * @return
     */
    PageInfo query(QueryObject qo)throws DisplayableException;

    /**
     * 更新/添加
     * @param strategyCatalog
     */
    void saveOrUpdate(StrategyCatalog strategyCatalog) throws DisplayableException;

    /**
     * 删除
     * @param id
     */
    void delete(Long id)throws DisplayableException;


    /**
     * 查所有
     * @return
     */
    List<StrategyCatalog> list();

    /**
     * 通过攻略id获取该攻略下分类
     * @param strategyId
     * @return
     */
    List<StrategyCatalog>  getCatalogByStrategyId(Long strategyId);

    /**
     * 通过目的地id查询攻略分类
     * @param id
     * @return
     */
    List<StrategyCatalog> queryByDestId(Long id);

    /**
     * 查单个
     * @param catalogId
     * @return
     */
    StrategyCatalog get(Long catalogId);
}
